package self.hoy.demo.grainmall.cart.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import self.hoy.demo.grainmall.cart.interceptor.CartInterceptor;
import self.hoy.demo.grainmall.cart.service.CartService;
import self.hoy.demo.grainmall.cart.vo.UserInfoTo;


/**
 * @author hyh
 * @date 2020/8/16
 */
@Controller
public class CartController {

    @Autowired
    private CartService cartService;

    /**
     * cookie:user-key 标识用户身份，一个月过期
     *
     */
    @GetMapping("/cart.html")
    public String cartListPage() {
        UserInfoTo user = CartInterceptor.threadLocal.get();

        return "cartList";
    }

}
